﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Wap/Agent/AgentSite.Master" AutoEventWireup="true" CodeBehind="AgentList.aspx.cs" Inherits="ZLCMS.Web.Wap.Agent.AgentList" %>

<%@ Register src="Footer.ascx" tagname="Footer" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">

<div data-role="page" id="mypage">

	<div data-role="header">
	</div><!-- /header -->

	<div role="main" class="ui-content">
    	<!--s top_title-->
        <div class="top_title"><span id="target"></span>下级代理<span id="total">0</span>人</div>
        <!--s top_title-->
        <div class="agentlist">
        </div>
        
  	</div><!-- /content -->

    <!--S footer -->
	<div data-role="footer" data-position="fixed" data-tap-toggle="false">
                <uc1:Footer ID="Footer1" runat="server" />    
    </div>
    <!--E footer -->
    
</div><!-- /page -->
 
<script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        var handler = $('.agentlist').listviewHandler();
        handler.initialize({
            loaderBtn: $('#moreBtn'), //加载数据按钮（点击加载下一页）
            emptyHtml: '无记录', //无记录时显示此html
            itemTemplate: '<div class="dailiList1">' +
            '<a href="AgentDetail.aspx?agent={AgentAccount}" data-ajax="false">' +
            '<div class="center">' +
                '<div class="Lf1">' +
                    '<h2><strong>【{RelationName}】</strong>{AgentName}</h2>' +
                    '<p><span>电话：<font>{AgentName}</font></span></p>' +
                    '<p><span>账号：<font>{Phone}</font></span></p>' +
                '</div>' +
                '<div class="Rg1"><img src="images/right_icon2.png"></div>' +
            '</div>' +
            '</a>' +
        '</div>', //项模板
            pageIndex: 1, //页码（从1起算）
            pageSize: 20, //页大小
            totalCount: 999, //总记录数
            itemHandler: function (data, itemTemplate, container) {//数据各项处理
                return itemTemplate.format(data);
            },
            beforeHandleResult: function (result, totalCount, container) {
                $('#total').text(totalCount);
            },
            command: 'Agent.LoadAgentList',
            parameter: { AgentAccount: '<%=ParentAccount %>' }
        });
        handler.nextPage();
    });
</script>

</asp:Content>
